home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 November
/
PCWorld_2007-11_cd.bin
/
system
/
everest
/
everestultimate400.exe
/
{app}
/
everest_vsb.vsb
/
EVEREST.Gadget
/
everest.js
< prev
next >
Wrap
Text File
|
2007-02-03
|
2KB
|
121 lines
var intHandle = 0;
var bodyHeight = 0;
var updateInterval = 5;
var regkey = 'HKCU\\Software\\Lavalys\\EVEREST\\VistaSidebar\\';
var WshShell = new ActiveXObject("WScript.Shell");
var skin = 'gold';
function loadMain()
{
skin=System.Gadget.Settings.read('Skin');
if (skin != '')
{
topimage.src='bktop_'+skin+'.png';
bottomimage.src='bkbottom_'+skin+'.png';
document.body.style.backgroundImage= 'url(bkloop_'+skin+'.png)';
}
updateGadget();
intHandle=setInterval("updateGadget()",updateInterval*1000);
setInterval("refreshGadget()",100);
}
function refreshGadget()
{
bodyHeight=container.offsetHeight-2;
document.body.style.height=bodyHeight;
}
function updateGadget()
{
var s = '';
var items ='';
var newInterval = 0;
var newSkin = '';
var newAlign = 'left';
try
{
var items=WshShell.RegRead(regkey+'Settings');
}
catch(err)
{
}
if(items.length > 1)
{
var sarray = items.split(',');
newInterval=sarray[0];
if (sarray[1] != '0') newAlign='right';
newSkin=sarray[2];
}
try
{
var items=WshShell.RegRead(regkey+'List');
}
catch(err)
{
}
if(items.length > 0)
{
var iarray = items.split(',');
s = '';
var s1 = '';
var s2 = '';
var s3 ='';
for (var i=0; i<iarray.length; i++)
{
s1=regkey+'Label.'+iarray[i];
s2=regkey+'Value.'+iarray[i];
s3=regkey+'Style.'+iarray[i];
try
{
s=s+'<li style="'+WshShell.RegRead(s3)+'; text-align: '+newAlign+'">'+WshShell.RegRead(s1);
s=s+': '+WshShell.RegRead(s2)+'</li>';
}
catch(err)
{
}
}
}
else
{
s='<li>EVEREST Ultimate is not running or the Sidebar support is disabled.</li>';
newInterval=1;
}
contents.innerHTML='<ul>'+s+'</ul>';
if(newSkin != '')
if(newSkin != skin)
{
skin=newSkin;
topimage.src='bktop_'+skin+'.png';
bottomimage.src='bkbottom_'+skin+'.png';
document.body.style.backgroundImage= 'url(bkloop_'+skin+'.png)';
System.Gadget.Settings.write('Skin',skin);
}
if (newInterval > 0)
if (updateInterval != newInterval)
{
updateInterval = newInterval;
clearInterval(intHandle);
intHandle=setInterval("updateGadget()",updateInterval*1000);
}
}